<?php

/**
 * ViviendasAlquileres filter form base class.
 *
 * @package    costabravasfr
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseViviendasAlquileresFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'nombre'             => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AlquileresDisponibilidad'), 'add_empty' => true)),
      'alias'              => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'apart_casa'         => new sfWidgetFormChoice(array('choices' => array('' => '', 0 => '0', 1 => '1'))),
      'capacidad'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'diacambio'          => new sfWidgetFormChoice(array('choices' => array('' => '', 'Lunes' => 'Lunes', 'Martes' => 'Martes', 'Miercoles' => 'Miercoles', 'Jueves' => 'Jueves', 'Viernes' => 'Viernes', 'Sabado' => 'Sabado', 'Domingo' => 'Domingo'))),
      'geolatitud'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'geolongitud'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'preciomin'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'ranking'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'fecha_inicio_rank'  => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'fecha_fin_rank'     => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'habitaciones'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'banos'              => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'tv'                 => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'wifi'               => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'satelite'           => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'calefaccion'        => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'aire'               => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'piscina'            => new sfWidgetFormChoice(array('choices' => array('' => '', 0 => '0', 1 => '1', 2 => '2'))),
      'jardin'             => new sfWidgetFormChoice(array('choices' => array('' => '', 0 => '0', 1 => '1', 2 => '2'))),
      'garaje'             => new sfWidgetFormChoice(array('choices' => array('' => '', 0 => '0', 1 => '1', 2 => '2'))),
      'parking'            => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'vistas'             => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'distplaya'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'activo'             => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'new'                => new sfWidgetFormChoice(array('choices' => array('' => '', 't' => 't', 's' => 's', 'n' => 'n'))),
      'timer'              => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'galeria'            => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'flechas'            => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'fotocomment'        => new sfWidgetFormChoice(array('choices' => array('' => '', 's' => 's', 'n' => 'n'))),
      'fechacreacion'      => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'fechaactualizacion' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'orderid'            => new sfWidgetFormFilterInput(),
      'desc_ca'            => new sfWidgetFormFilterInput(),
      'desc_pre_ca'        => new sfWidgetFormFilterInput(),
      'desc_brev_ca'       => new sfWidgetFormFilterInput(),
      'desc_es'            => new sfWidgetFormFilterInput(),
      'desc_pre_es'        => new sfWidgetFormFilterInput(),
      'desc_brev_es'       => new sfWidgetFormFilterInput(),
      'desc_en'            => new sfWidgetFormFilterInput(),
      'desc_pre_en'        => new sfWidgetFormFilterInput(),
      'desc_brev_en'       => new sfWidgetFormFilterInput(),
      'desc_nl'            => new sfWidgetFormFilterInput(),
      'desc_pre_nl'        => new sfWidgetFormFilterInput(),
      'desc_brev_nl'       => new sfWidgetFormFilterInput(),
      'desc_fr'            => new sfWidgetFormFilterInput(),
      'desc_pre_fr'        => new sfWidgetFormFilterInput(),
      'desc_brev_fr'       => new sfWidgetFormFilterInput(),
      'palabrasinfo'       => new sfWidgetFormFilterInput(),
      'zona'               => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('ZonasViviendas'), 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'nombre'             => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('AlquileresDisponibilidad'), 'column' => 'nombre')),
      'alias'              => new sfValidatorPass(array('required' => false)),
      'apart_casa'         => new sfValidatorChoice(array('required' => false, 'choices' => array(0 => '0', 1 => '1'))),
      'capacidad'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'diacambio'          => new sfValidatorChoice(array('required' => false, 'choices' => array('Lunes' => 'Lunes', 'Martes' => 'Martes', 'Miercoles' => 'Miercoles', 'Jueves' => 'Jueves', 'Viernes' => 'Viernes', 'Sabado' => 'Sabado', 'Domingo' => 'Domingo'))),
      'geolatitud'         => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'geolongitud'        => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'preciomin'          => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'ranking'            => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'fecha_inicio_rank'  => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'fecha_fin_rank'     => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'habitaciones'       => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'banos'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'tv'                 => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'wifi'               => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'satelite'           => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'calefaccion'        => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'aire'               => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'piscina'            => new sfValidatorChoice(array('required' => false, 'choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'jardin'             => new sfValidatorChoice(array('required' => false, 'choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'garaje'             => new sfValidatorChoice(array('required' => false, 'choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'parking'            => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'vistas'             => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'distplaya'          => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'activo'             => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'new'                => new sfValidatorChoice(array('required' => false, 'choices' => array('t' => 't', 's' => 's', 'n' => 'n'))),
      'timer'              => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'galeria'            => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'flechas'            => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'fotocomment'        => new sfValidatorChoice(array('required' => false, 'choices' => array('s' => 's', 'n' => 'n'))),
      'fechacreacion'      => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'fechaactualizacion' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'orderid'            => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'desc_ca'            => new sfValidatorPass(array('required' => false)),
      'desc_pre_ca'        => new sfValidatorPass(array('required' => false)),
      'desc_brev_ca'       => new sfValidatorPass(array('required' => false)),
      'desc_es'            => new sfValidatorPass(array('required' => false)),
      'desc_pre_es'        => new sfValidatorPass(array('required' => false)),
      'desc_brev_es'       => new sfValidatorPass(array('required' => false)),
      'desc_en'            => new sfValidatorPass(array('required' => false)),
      'desc_pre_en'        => new sfValidatorPass(array('required' => false)),
      'desc_brev_en'       => new sfValidatorPass(array('required' => false)),
      'desc_nl'            => new sfValidatorPass(array('required' => false)),
      'desc_pre_nl'        => new sfValidatorPass(array('required' => false)),
      'desc_brev_nl'       => new sfValidatorPass(array('required' => false)),
      'desc_fr'            => new sfValidatorPass(array('required' => false)),
      'desc_pre_fr'        => new sfValidatorPass(array('required' => false)),
      'desc_brev_fr'       => new sfValidatorPass(array('required' => false)),
      'palabrasinfo'       => new sfValidatorPass(array('required' => false)),
      'zona'               => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('ZonasViviendas'), 'column' => 'zona')),
    ));

    $this->widgetSchema->setNameFormat('viviendas_alquileres_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ViviendasAlquileres';
  }

  public function getFields()
  {
    return array(
      'id'                 => 'Number',
      'nombre'             => 'ForeignKey',
      'alias'              => 'Text',
      'apart_casa'         => 'Enum',
      'capacidad'          => 'Number',
      'diacambio'          => 'Enum',
      'geolatitud'         => 'Number',
      'geolongitud'        => 'Number',
      'preciomin'          => 'Number',
      'ranking'            => 'Number',
      'fecha_inicio_rank'  => 'Date',
      'fecha_fin_rank'     => 'Date',
      'habitaciones'       => 'Number',
      'banos'              => 'Number',
      'tv'                 => 'Enum',
      'wifi'               => 'Enum',
      'satelite'           => 'Enum',
      'calefaccion'        => 'Enum',
      'aire'               => 'Enum',
      'piscina'            => 'Enum',
      'jardin'             => 'Enum',
      'garaje'             => 'Enum',
      'parking'            => 'Enum',
      'vistas'             => 'Enum',
      'distplaya'          => 'Number',
      'activo'             => 'Enum',
      'new'                => 'Enum',
      'timer'              => 'Enum',
      'galeria'            => 'Enum',
      'flechas'            => 'Enum',
      'fotocomment'        => 'Enum',
      'fechacreacion'      => 'Date',
      'fechaactualizacion' => 'Date',
      'orderid'            => 'Number',
      'desc_ca'            => 'Text',
      'desc_pre_ca'        => 'Text',
      'desc_brev_ca'       => 'Text',
      'desc_es'            => 'Text',
      'desc_pre_es'        => 'Text',
      'desc_brev_es'       => 'Text',
      'desc_en'            => 'Text',
      'desc_pre_en'        => 'Text',
      'desc_brev_en'       => 'Text',
      'desc_nl'            => 'Text',
      'desc_pre_nl'        => 'Text',
      'desc_brev_nl'       => 'Text',
      'desc_fr'            => 'Text',
      'desc_pre_fr'        => 'Text',
      'desc_brev_fr'       => 'Text',
      'palabrasinfo'       => 'Text',
      'zona'               => 'ForeignKey',
    );
  }
}
